Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Fill down formula using a "dictionary" for sheet and column values in Google Apps Script?

I'm looking to do a filldown formula in Google Apps Script. I have a "dictionary" that contains the sheet names and the columns that need to be filled. However I am running into an issue in that I can't get the sheet I need from my key value. The key returns the right string for the sheet name, but .getsheetbyname(key) "can't read property of null".

Here is what I have:

 function filldown(){
    var sheetNames = {
        "PO Tool Import":["A","AK","AL"],
        "Live Orders Aggregated":["A"],
        "Date Lookup":["A"],
        "Containerized POs":["A","B","C","D","E","F","K","R","S","T","U","V","W","X","Y","Z","AA","AB","AC","AD","AE","AF","AG","AH","AI","AJ","AK","AL","AM","AN","AO","AP","AQ","AR","AS","AT"],
        }

for (var key in sheetNames){

    var sheetName = thisBook.getSheetByName(key).getSheetName();

    Logger.log(key);
    Logger.log(sheetNames[key]);
    Logger.log(sheetName);
    };
};

Using these returns, I will then create a formula to return the index for the columns and the length of the filldown/copy to range.

Any suggestions are appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Ok so after some review it turns out that the key was not the correct string to match the sheet names, as someone had change the names of the sheets in the workbook.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda